<template>
  <div class="book-header">
    <div>{{ titleDesc }}</div>
  </div>
</template>

<script>
export default {
  naame: 'BookHeader',
  props: {
    chapter: {
      type: Object,
      default() {
        return {
          id: 0,
          order: 0,
          title: '',
          totalWords: 0
        }
      }
    }
  },
  // mounted(){
  //   console.log(this.chapter)
  // },
  // watch: {
  //   chapter (newChapter, oldChapter) {
  //     console.log('new', newChapter)
  //   }
  // },
  computed: {
    titleDesc() {
      return "第" + this.chapter.order + "章   " + this.chapter.title
    }
  }
}
</script>

<style>
.book-header{
  padding: 2% 5%;
  font-size: large;
}
</style>